import type { RouteConfig } from '../helper';

// 处理本地路由表
const modulesRouter = import.meta.glob('./*.ts', {
  eager: true,
  import: 'default',
});

const asyncRoutesMap: RouteConfig[] = Object.keys(modulesRouter).map(key => {
  return modulesRouter[key] as RouteConfig;
});

export default asyncRoutesMap;
